<%@page import="monster.comm.util.SpringApplicationContextFactory"%>
<%@page import="monster.flight.admin.manager.service.admin.Flight_infoService"%>
<%@page import="monster.flight.comm.util.FlightFactory"%>
<%@page import="monster.comm.util.DateUtil"%>
<%@page import="monster.flight.comm.entity.vo.FlightBay"%>
<%@page import="sun.jdbc.rowset.CachedRowSet"%>
<%@page import="monster.flight.comm.entity.vo.Flight_info"%>
<%@page import="monster.comm.database.DBManager"%>
<%@page import="monster.comm.util.SysConstant"%>
<%@page import="monster.comm.util.UserService"%>
<%@page import="monster.comm.util.Tool"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String sn=Tool.getRequest("sn",request);//
String type=Tool.getRequest("type",request);
if(type.equals(""))type="1";
String list="";
UserService user = (UserService) session.getAttribute(SysConstant.SESSION_NAME);//获得session里面的登陆信息
if(1==2){
	out.println("{\"id\":-100,\"name\":\"没有登录\"}");
	return;
}else{
	try{
		DBManager db = new DBManager();
		String sql="";
		if(type.equals("1")){
			sql="DELETE FROM STAFF_RAN_PLAN WHERE RAN_SN="+SN;
		}else if(type.equals("2")){
			sql="DELETE FROM STAFF_STATION_PLAN WHERE STATION_SN="+SN;
		}else if(type.equals("3")){			
			sql="DELETE FROM STAFF_HOLIDAY_PLAN WHERE HOLIDAY_SN="+SN;
		}
		db.update(sql);
		list="{\"id\":100}";

		
	}catch(Exception e){
		 e.printStackTrace();
		 list="{\"id\":-200,\"name\":\"程序异常\"}";
	}
	
	out.println(list);

}
%>
